/*
 * File:   Rule.h
 * Author: Elevator
 *
 * Created on July 14, 2013, 5:38 PM
 */

#ifndef DATA_RULE_H
#define DATA_RULE_H

#include "Action.h"
#include "Command.h"

namespace data {

	struct Rule {
	public:
		Rule(
			const Command& command,
			const Action& action ) :
		_command( command ),
		_action( action )
		{}

		inline const Command GetCommand( ) const { return _command; }
		inline void SetCommand( const Command& command ) { _command = command; }

		const Action GetAction( ) const { return _action; }
		inline void SetAction( Action action ) { _action = action; }

	private:
		Command _command;
		Action _action;
	};

	inline bool operator == (const Rule& a, const Rule& b) {
		return
			a.GetCommand() == b.GetCommand() &&
			a.GetAction() == b.GetAction();
	}
}
#endif	/* DATA_RULE_H */
